package com.summer.data.type;

/**
 * @author 345480567@qq.com
 */
public class Union2<T1, T2> {

    public T1 t1;
    public T2 t2;

    public String toString() {
        return String.format("%s: %s", t1.toString(), t2.toString());
    }

    public static <T1, T2> Union2<T1, T2> create(T1 t1, T2 t2) {
        Union2<T1, T2> u2 = new Union2<>();
        u2.t1 = t1;
        u2.t2 = t2;
        return u2;
    }

}

